<style>
    input[type='text'].inputstyle,
    input[type='number'].inputstyle,
    input[id^='ad_pic_']{
        width: 50%;
    }
</style>
<div class="tableform">
    <div class="widgetconfig">
        <table cellspacing="0" cellpadding="0" border="0" width="100%">
            <tbody>
                <tr>
                    <th>挂件说明：</th>
                    <td>图片可按5的倍数比例自由组合，最大是100，图片从左到右排列</td>
                </tr>
                <tr>
                    <th>图片1</th>
                </tr>
                <tr>
                    <th>图片地址：</th>
                    <td><input name='ad_pic_1' class="inputstyle" id="ad_pic_1" value="<{$setting.ad_pic_1}>" />&nbsp;&nbsp;
                        <input type="button" value="上传图片" class="uploadbtn" onclick="addPic('ad_pic_1')" />
                    </td>
                </tr>
                <tr>
                    <th>图片描述：</th>
                    <td><input type="text" name="ad_pic_txt_1" value="<{$setting.ad_pic_txt_1}>" class="inputstyle" >
                        </td>
                </tr>
                <tr>
                    <th>图片链接：</th>
                    <td><input type="text" name="ad_pic_link_1" value="<{$setting.ad_pic_link_1}>" class="inputstyle" />
                    </td>
                </tr>
                <tr>
                    <th>图片宽度：</th>
                    <td><input type="number" name="ad_pic_width_1" value="<{$setting.ad_pic_width_1}>" class="inputstyle" />
                    </td>
                </tr>
                <!---------------------------------------------------->
                <tr>
                    <th>图片2</th>
                </tr>
                <tr>
                    <th>图片地址：</th>
                    <td><input name='ad_pic_2' class="inputstyle" id="ad_pic_2" value="<{$setting.ad_pic_2}>" />&nbsp;&nbsp;
                        <input type="button" value="上传图片" class="uploadbtn" onclick="addPic('ad_pic_2')" />
                    </td>
                </tr>
                <tr>
                    <th>图片描述：</th>
                    <td><input type="text" name="ad_pic_txt_2" value="<{$setting.ad_pic_txt_2}>" class="inputstyle">
                        </td>
                </tr>
                <tr>
                    <th>图片链接：</th>
                    <td><input type="text" name="ad_pic_link_2" value="<{$setting.ad_pic_link_2}>" class="inputstyle"  />
                    </td>
                </tr>
                <tr>
                    <th>图片宽度：</th>
                    <td><input type="number" name="ad_pic_width_2" value="<{$setting.ad_pic_width_2}>" class="inputstyle"  />
                    </td>
                </tr>
                <!---------------------------------------------------->
                <tr>
                    <th>图片3</th>
                </tr>
                <tr>
                    <th>图片地址：</th>
                    <td><input name='ad_pic_3' class="inputstyle" id="ad_pic_3" value="<{$setting.ad_pic_3}>"  />&nbsp;&nbsp;
                        <input type="button" value="上传图片" class="uploadbtn" onclick="addPic('ad_pic_3')" />
                    </td>
                </tr>
                <tr>
                    <th>图片描述：</th>
                    <td><input type="text" name="ad_pic_txt_3" value="<{$setting.ad_pic_txt_3}>" class="inputstyle">
                        </td>
                </tr>
                <tr>
                    <th>图片链接：</th>
                    <td><input type="text" name="ad_pic_link_3" value="<{$setting.ad_pic_link_3}>" class="inputstyle" />
                    </td>
                </tr>
                <tr>
                    <th>图片宽度：</th>
                    <td><input type="number" name="ad_pic_width_3" value="<{$setting.ad_pic_width_3}>" class="inputstyle" />
                    </td>
                </tr>
                <!---------------------------------------------------->
                <tr>
                    <th>图片4</th>
                </tr>
                <tr>
                    <th>图片地址：</th>
                    <td><input name='ad_pic_4' class="inputstyle" id="ad_pic_4" value="<{$setting.ad_pic_4}>" />&nbsp;&nbsp;
                        <input type="button" value="上传图片" class="uploadbtn" onclick="addPic('ad_pic_4')" />
                    </td>
                </tr>
                <tr>
                    <th>图片描述：</th>
                    <td><input type="text" name="ad_pic_txt_4" value="<{$setting.ad_pic_txt_4}>" class="inputstyle" >
                        </td>
                </tr>
                <tr>
                    <th>图片链接：</th>
                    <td><input type="text" name="ad_pic_link_4" value="<{$setting.ad_pic_link_4}>" class="inputstyle" />
                    </td>
                </tr>
                <tr>
                    <th>图片宽度：</th>
                    <td><input type="number" name="ad_pic_width_4" value="<{$setting.ad_pic_width_4}>" class="inputstyle" />
                    </td>
                </tr>
                <!---------------------------------------------------->
                <tr>
                    <th>图片5</th>
                </tr>
                <tr>
                    <th>图片地址：</th>
                    <td><input name='ad_pic_5' class="inputstyle" id="ad_pic_5" value="<{$setting.ad_pic_5}>" />&nbsp;&nbsp;
                        <input type="button" value="上传图片" class="uploadbtn" onclick="addPic('ad_pic_5')" />
                    </td>
                </tr>
                <tr>
                    <th>图片描述：</th>
                    <td><input type="text" name="ad_pic_txt_5" value="<{$setting.ad_pic_txt_5}>" class="inputstyle" />
                        </td>
                </tr>
                <tr>
                    <th>图片链接：</th>
                    <td><input type="text" name="ad_pic_link_5" value="<{$setting.ad_pic_link_5}>" class="inputstyle" />
                    </td>
                </tr>
                <tr>
                    <th>图片宽度：</th>
                    <td><input type="number" name="ad_pic_width_5" value="<{$setting.ad_pic_width_5}>" class="inputstyle"  />
                    </td>
                </tr>
                <!---------------------------------------------------->
                <tr>
                    <th>图片6</th>
                </tr>
                <tr>
                    <th>图片地址：</th>
                    <td><input name='ad_pic_6' class="inputstyle" id="ad_pic_6" value="<{$setting.ad_pic_6}>"  />&nbsp;&nbsp;
                        <input type="button" value="上传图片" class="uploadbtn" onclick="addPic('ad_pic_6')" />
                    </td>
                </tr>
                <tr>
                    <th>图片描述：</th>
                    <td><input type="text" name="ad_pic_txt_6" value="<{$setting.ad_pic_txt_6}>" class="inputstyle" />
                        </td>
                </tr>
                <tr>
                    <th>图片链接：</th>
                    <td><input type="text" name="ad_pic_link_6" value="<{$setting.ad_pic_link_6}>" class="inputstyle"  />
                    </td>
                </tr>
                <tr>
                    <th>图片宽度：</th>
                    <td><input type="number" name="ad_pic_width_6" value="<{$setting.ad_pic_width_6}>" class="inputstyle" />
                    </td>
                </tr>
                <!---------------------------------------------------->

        </tbody>
       </table>
    </div>
</div>
<script>
function addPic(id){
	var url='index.php?app=desktop&act=alertpages&goto='+encodeURIComponent("index.php?app=image&ctl=admin_manage&act=image_broswer&type=big");
	Ex_Loader('modedialog',function(){
		return new imgDialog(url,{onCallback:function(image_id,image_src){
				$(id).value=image_src;
		}})	;
	});
}
</script>